#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->comboBox->addItem("板烧鸡腿堡");
    ui->comboBox->addItem("麦辣鸡腿堡");
    ui->comboBox->addItem("巨无霸汉堡");
    ui->spinBox->setMaximum(10);

    ui->comboBox_3->addItem("可乐");
    ui->comboBox_3->addItem("橙汁");
    ui->comboBox_3->addItem("雪碧");
    ui->spinBox_3->setMaximum(5);

    ui->comboBox_2->addItem("薯条");
    ui->comboBox_2->addItem("鸡腿");
    ui->comboBox_2->addItem("鸡块");
    ui->spinBox_2->setMaximum(10);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    qDebug() << "汉堡: " << ui->comboBox->currentText() << ui->spinBox->value() << "个" <<
                "饮品" << ui->comboBox_2->currentText() << ui->spinBox_2->value() << "杯" <<
                "小吃" << ui->comboBox_3->currentText() << ui->spinBox_3->value() << "个";
 }
